search for: libvirt_domain_disk_remov

Displaying 3 results from an estimated 3 matches for "libvirt_domain_disk_remov".

2019 Aug 01
3
Detach disk from VM - virsh (working) vs. PHP (not working)
..._disk_add($domain, "/users/".$name.".img", "vdb", "virtio", "qcow2", NULL); libvirt_domain_create($domain); (or instead libvirt_domain_disk_add i can define disk directly in XML) But in this case, the server will not boot (GRUB error) 2, simple: libvirt_domain_disk_remove($domain,“vda“); libvirt_domain_reboot($domain); The problem of this solution is thats not working. The remove disk is failing with error „Unable attach disk“ - i looks to source code, and yes, there is a mystake with „attach“/„detach“, but main problem i see in log from libvirt: Aug 1 02:57:05...
2019 Aug 02
2
Re: Detach disk from VM - virsh (working) vs. PHP (not working)
...n): Array ( [0] => vda [1] => vdb [num] => 2 ) As you see, there is vdb device in all cases. PHP code is very simple: $server = libvirt_connect("qemu+tls://".$ip.“:“.$port."/system", false); $domain = libvirt_domain_lookup_by_name($server, "debian-test2"); libvirt_domain_disk_remove($domain,"vdb"); print_r(libvirt_get_last_error()); res: Unable to detach disk > 2. 8. 2019 v 14:15, Michal Privoznik <mprivozn@redhat.com>: > > On 8/1/19 10:12 AM, Jan Horak wrote: >> Hi all, >> i created a script in PHP for create a virtual server with two...
2019 Aug 02
0
Re: Detach disk from VM - virsh (working) vs. PHP (not working)
...I don't know how domain_create_xml() works - it's not a libvirt-php function. There are two possibilities here: 1) make sure domain_create_xml() sets boot devices 2) construct disk XML yourself, and put "<boot order='N'/>" into it > > 2, simple: > > libvirt_domain_disk_remove($domain,“vda“); > libvirt_domain_reboot($domain); > > The problem of this solution is thats not working. The remove disk is failing with error „Unable attach disk“ - i looks to source code, and yes, there is a mystake with „attach“/„detach“, but main problem i see in log from libvirt: O...