Static NAT with multiple public interfaces uses wrong outgoing IP

2020-07-30 Thread li jerry
HI all
   Recently we upgraded a set of CloudStack 4.7.1 to 4.13.1. After the 
upgrade, a static NAT with multiple public interfaces uses the wrong outgoing 
IP (all was normal before the upgrade)

All NAT-failed networks have the following common points:

1. There are 2 or more public network nics on VR (eth2, eth3...), each nic has 
different public network ip
2. When VM Enable Static Nat, and Static Nat IP is not on the first public 
network nic (eth2), the exit of the VM will be source nat ip (it should be 
static nat ip if it is correct)


The fault is very similar to this 
https://github.com/apache/cloudstack/issues/3168


Has anyone encountered this problem? How should it be handled?


Thanks to everyone who helped
-Jerry



Re: Windows Template & Multiple SCSI Controllers

2020-07-30 Thread Marc-Andre Jutras

Hey Mike,


disk OSdefaut: it will use IDE if i'm right...

2 nics: are your seeing these 2 nic in cloudstack too ?


Template: I've build up my Windows 10 template directly in cloudstack...

My steps:

 - upload a Win10 ISO on Cloudstack

 - create a new VM with your ISO ( 1 gb ram, 1 nic, 1 vcpu, 30gb disk )

 - install the latest vmware-tools and cloudbase-init ( 
https://cloudbase-init.readthedocs.io/en/latest/intro.html#download )


 - do a sysprep... shutdown your vm...

 - create a snapshot / template of your disk in cloudstack

 - when done, in cloudstack, modify your template settings and add:

  - - keyboard : us

  - - nicAdapter : Vmxnet3

  - - rootDiskController : lsisas1068


Then, Test !! try to start a vm from your template, set the root disk to 
60 Gb and 2 vcpu, 4 gb ram... keep us updated with your results ;)



Recommended global settings:

 - Vmware.create.full.clone : true

 - Vmware.create.base.shapshot : true

 - vmware.root.disk.controller: lsisas1068

 - vmware.systemvm.nic.device.type: vmxnet3


Marcus

On 2020-07-29 1:53 PM, Corey, Mike wrote:

Thanks Marc & Thomas for your responses.

Setting from "lsilogic" to "osdefault" got my one Windows10 Template to load to 
OS as expected - it literally is just a vanilla installation of Windows 10 with sysprep.  However, 
it now has two NICs configured for it.  (Again, is this normal behavior?)

Its still not clear as to why the additional SCSI adapters are added to the 
deployed instance.  Now I'm having the second NIC added.

Marc - for your Windows Templates/Images - did you use any imaging preparation 
tools like MDT or other that customizes settings/preferences/apps as the OS 
starts for the first time?  If so, any issues with the system partition loading 
as expecting during your initial experience?

Thanks!

Mike





-Original Message-
From: Thomas Joseph 
Sent: Tuesday, July 28, 2020 9:56 PM
To: users@cloudstack.apache.org
Subject: Re: Windows Template & Multiple SCSI Controllers

To add few more troubleshooting tips:
1. In template/VM settings tab, add entries for  Vnic (vmxnet3) and root &
data disk controllers (osdefault) from the dropdown menu.
2. You would need to have vmtools in the template.

Regards
Thomas

On Wed, 29 Jul 2020, 6:50 am Marc-Andre Jutras, 
wrote:


Hey Mike,

On 2020-07-28 3:37 PM, Corey, Mike wrote:

I could use some advice on this.  I completely recreated my Window10

VM/Template and imported it into ACS.  Deploying an instance runs; however
a couple things are out of the normal and I could use some guidance on
troubleshooting.

1 - The ASC template that ASC deploys does not include the network

adapter that my imported OVA has.  Is this expected behavior of the
template?


Yes, It's expected, vNIC will be added to your VM only when you will
start your VM...



2 - Booting the deployed Instance VM to UEFI can't see the system volume

(device 0:0) and fails to boot up Windows.
make sure you boot up your vm from cloudstack and not from vmware...

3 - Booting the deployed Instance VM to BIOS gets a Windows

unrecoverable error - fails to boot up Windows correctly.
same... make sure you boot up your vm from cloudstack and not from
vmware...

Cloning a VM from the ASC Deployed Template VM (adding a vnic after)

works and the VM loads as expected.

whoa, party on dude ;)

to use vmxnet3 driver or any others specific settings in your template,
on acs, select your template and under settings, add :

nicAdapter = Vmxnet3
and define any others settings there... ( keyboard, root scsi driver,
etc... )


So my question to the greater forum is what is ASC doing under the

covers to the VM hardware that could prevent the OS / System Volume /
primary partition from loading in the ASC deployed VM Instance?
ACS drives vmware through API calls, ACS will push configuration to your
vm only when needed : always manage your VM via Cloudstack and don't do
anything directly on vmware ;)


Anyone with a VMware & CloudStack deployment running out here that can

shed some light?
yup, me ;)  6 ACS regions with vmware 5.5, 6.0 and 6.7 ( upgrade to 6.7
on all regions on hold for now // covid... )

Thanks!

Mike





-Original Message-
From: Corey, Mike 
Sent: Monday, July 27, 2020 11:48 AM
To: users@cloudstack.apache.org
Subject: [CAUTION] RE: Windows Template & Multiple SCSI Controllers

Why would you hardcode the addition of unrequired/unnecessary "hardware"

to the VM instance?  This wasn't the case for the CentOS deployment so why
do it with Windows OS?

I can't say for certain, but the VM instance that ACS creates doesn't

start the OS (blue screen recovery console).  However, cloning from the
template ACS creates in vCenter through the tradition vCenter method, the
VM loads as normal.

Can this be changed via a global setting or other config file edit?



-Original Message-
From: Andrija Panic 
Sent: Saturday, July 25, 2020 2:44 PM
To: users 
Subject: Re: Windows Template & Multiple SCSI Controllers

H

RE: Windows Template & Multiple SCSI Controllers

2020-07-30 Thread Corey, Mike
Thanks Marcus, your process is helpful to me and I may test it out for my 
build.  In theory, shouldn't I be able to use a "template" that I've created 
and used in VMware and not have to build it out through CloudStack with ISO, 
etc.?

In your test steps, I don't understand why you have to add a 60GB root volume 
when creating the VM Instance - won't it just use the volume size/layout of the 
template VM?

What I'm really trying to figure out is why CloudStack is injecting the VM 
instance with 3 extra SCSI controllers and if this could be causing my VMs from 
failing to boot as expected.

My "production" template, that we use in a non-CloudStack VMware environment is 
not working.  Its built on VMware hardware 13 and LSILogic controller.  No 
matter what I set the template diskcontroller type to use (osdefault, lsilogic, 
lsisas1068) - the VM Instance doesn't find the system volume and only attempts 
to boot to the network.  What logs or entries in ACS can I look at to help 
isolate the issue?
  
Any thoughts?

Mike



 

-Original Message-
From: Marc-Andre Jutras  
Sent: Thursday, July 30, 2020 12:06 PM
To: users@cloudstack.apache.org
Subject: Re: Windows Template & Multiple SCSI Controllers

Hey Mike,


disk OSdefaut: it will use IDE if i'm right...

2 nics: are your seeing these 2 nic in cloudstack too ?


Template: I've build up my Windows 10 template directly in cloudstack...

My steps:

  - upload a Win10 ISO on Cloudstack

  - create a new VM with your ISO ( 1 gb ram, 1 nic, 1 vcpu, 30gb disk )

  - install the latest vmware-tools and cloudbase-init ( 
https://cloudbase-init.readthedocs.io/en/latest/intro.html#download )

  - do a sysprep... shutdown your vm...

  - create a snapshot / template of your disk in cloudstack

  - when done, in cloudstack, modify your template settings and add:

   - - keyboard : us

   - - nicAdapter : Vmxnet3

   - - rootDiskController : lsisas1068


Then, Test !! try to start a vm from your template, set the root disk to 
60 Gb and 2 vcpu, 4 gb ram... keep us updated with your results ;)


Recommended global settings:

  - Vmware.create.full.clone : true

  - Vmware.create.base.shapshot : true

  - vmware.root.disk.controller: lsisas1068

  - vmware.systemvm.nic.device.type: vmxnet3


Marcus

On 2020-07-29 1:53 PM, Corey, Mike wrote:
> Thanks Marc & Thomas for your responses.
>
> Setting from "lsilogic" to "osdefault" got my one Windows10 Template to load 
> to OS as expected - it literally is just a vanilla installation of Windows 10 
> with sysprep.  However, it now has two NICs configured for it.  (Again, is 
> this normal behavior?)
>
> Its still not clear as to why the additional SCSI adapters are added to the 
> deployed instance.  Now I'm having the second NIC added.
>
> Marc - for your Windows Templates/Images - did you use any imaging 
> preparation tools like MDT or other that customizes settings/preferences/apps 
> as the OS starts for the first time?  If so, any issues with the system 
> partition loading as expecting during your initial experience?
>
> Thanks!
>
> Mike
>
>
>
>
>
> -Original Message-
> From: Thomas Joseph 
> Sent: Tuesday, July 28, 2020 9:56 PM
> To: users@cloudstack.apache.org
> Subject: Re: Windows Template & Multiple SCSI Controllers
>
> To add few more troubleshooting tips:
> 1. In template/VM settings tab, add entries for  Vnic (vmxnet3) and root &
> data disk controllers (osdefault) from the dropdown menu.
> 2. You would need to have vmtools in the template.
>
> Regards
> Thomas
>
> On Wed, 29 Jul 2020, 6:50 am Marc-Andre Jutras, 
> wrote:
>
>> Hey Mike,
>>
>> On 2020-07-28 3:37 PM, Corey, Mike wrote:
>>> I could use some advice on this.  I completely recreated my Window10
>> VM/Template and imported it into ACS.  Deploying an instance runs; however
>> a couple things are out of the normal and I could use some guidance on
>> troubleshooting.
>>> 1 - The ASC template that ASC deploys does not include the network
>> adapter that my imported OVA has.  Is this expected behavior of the
>> template?
>>
>>
>> Yes, It's expected, vNIC will be added to your VM only when you will
>> start your VM...
>>
>>
>>> 2 - Booting the deployed Instance VM to UEFI can't see the system volume
>> (device 0:0) and fails to boot up Windows.
>> make sure you boot up your vm from cloudstack and not from vmware...
>>> 3 - Booting the deployed Instance VM to BIOS gets a Windows
>> unrecoverable error - fails to boot up Windows correctly.
>> same... make sure you boot up your vm from cloudstack and not from
>> vmware...
>>> Cloning a VM from the ASC Deployed Template VM (adding a vnic after)
>> works and the VM loads as expected.
>>
>> whoa, party on dude ;)
>>
>> to use vmxnet3 driver or any others specific settings in your template,
>> on acs, select your template and under settings, add :
>>
>> nicAdapter = Vmxnet3
>> and define any others settings there... ( keyboard, root scsi driver,
>> etc... )
>>
>>> So my question to the greater forum