how to set the NetworkType as bridge of vs with libvirt-cim provider

Hi, I want to define a virtual domain with bridge type by libvirt-cim provider. Below is part of code of RASD description, but it fails for me. ... rasd = [ """instance of KVM_MemResourceAllocationSettingData { VirtualQuantity = 256;};""", """instance of KVM_ProcResourceAllocationSettingData { VirtualQuantity = 1;};""", """instance of KVM_NetResourceAllocationSettingData { Address = "00:11:22:33:44:55"; ResourceType = 10; NetworkType='bridge';};""", """instance of KVM_DiskResourceAllocationSettingData { Address = "/tmp/default-kvm-dimage"; VirtualDevice = "hda";};""" ] service.DefineSystem(SystemSettings=vssd, ResourceSettings=rasd, ReferenceConfiguration='') ... It seems that the NetworkType is set network as default in libvirt-cim provider. Although I try to set the NetworkType as bridge, it still to looking up default network pool. If I want to define a vs with bridge type, what should I do? Thanks! Best, Regards Daisy (运国莲) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol@cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203

Guo Lian Yun wrote:
Hi,
I want to define a virtual domain with bridge type by libvirt-cim provider. Below is part of code of RASD description, but it fails for me.
... rasd = [ """instance of KVM_MemResourceAllocationSettingData { VirtualQuantity = 256;};""", """instance of KVM_ProcResourceAllocationSettingData { VirtualQuantity = 1;};""", """instance of KVM_NetResourceAllocationSettingData { Address = "00:11:22:33:44:55"; ResourceType = 10; NetworkType='bridge';};""", """instance of KVM_DiskResourceAllocationSettingData { Address = "/tmp/default-kvm-dimage"; VirtualDevice = "hda";};""" ]
service.DefineSystem(SystemSettings=vssd, ResourceSettings=rasd, ReferenceConfiguration='') ...
It seems that the NetworkType is set network as default in libvirt-cim provider. Although I try to set the NetworkType as bridge, it still to looking up default network pool. If I want to define a vs with bridge type, what should I do?
The providers only define guests with network type interfaces. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Guo Lian Yun wrote:
Hi,
I want to define a virtual domain with bridge type by libvirt-cim
libvirt-cim-bounces@redhat.com wrote on 2008-11-25 02:17:08: provider.
Below is part of code of RASD description, but it fails for me.
... rasd = [ """instance of KVM_MemResourceAllocationSettingData { VirtualQuantity = 256;};""", """instance of KVM_ProcResourceAllocationSettingData {
VirtualQuantity = 1;};""", """instance of KVM_NetResourceAllocationSettingData { Address = "00:11:22:33:44:55"; ResourceType = 10; NetworkType='bridge';};""", """instance of KVM_DiskResourceAllocationSettingData {
Address = "/tmp/default-kvm-dimage"; VirtualDevice = "hda";};""" ]
service.DefineSystem(SystemSettings=vssd, ResourceSettings=rasd, ReferenceConfiguration='') ...
It seems that the NetworkType is set network as default in libvirt-cim
provider. Although I try to set the NetworkType as bridge, it still to
looking up default network pool. If I want to define a vs with bridge type, what should I do?
The providers only define guests with network type interfaces.
Hmm, then how to enable the network? Below are the steps: 1) Firstly, I create a networkpool by virsh, and then set it as default. <network> <name>cimtest-networkpool</name> <uuid>aae93257-4100-4ebb-bf9a-70456abdbf93</uuid> <forward/> <bridge name='bridge-test' stp='on' forwardDelay='0' /> <ip address='192.168.122.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.122.2' end='192.168.122.254' /> </dhcp> </ip> </network> 2) Then I create a guest with specified mac address such as 00:11:22:33:44:55 3) I'm not sure how does provider allocate real ip address to the guest? If I want to connect to the guest, how to get its ip address? Thanks!
-- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim

The providers only define guests with network type interfaces.
Hmm, then how to enable the network? Below are the steps:
1) Firstly, I create a networkpool by virsh, and then set it as default. <network> <name>cimtest-networkpool</name> <uuid>aae93257-4100-4ebb-bf9a-70456abdbf93</uuid> <forward/> <bridge name='bridge-test' stp='on' forwardDelay='0' /> <ip address='192.168.122.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.122.2' end='192.168.122.254' /> </dhcp> </ip> </network>
2) Then I create a guest with specified mac address such as 00:11:22:33:44:55 3) I'm not sure how does provider allocate real ip address to the guest? If I want to connect to the guest, how to get its ip address?
The providers just set up the necessary devices the guest needs. It's up to the user to install the OS in the guest. During the OS install process, you can specify an IP address for the guest. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (2)
-
Guo Lian Yun
-
Kaitlin Rupert